#include<stdio.h>
int main(){
	int power = 0;
	double cost = 0;
	
	scanf("%d",&power);
	if(power > 50){
		cost = 50 * 0.53 + (power-50) * 0.58;
		printf("cost = %.2lf",cost);
	}else if(power > 0){
		cost = power * 0.53;
		printf("cost = %.2lf",cost);
	}else{
		printf("Invalid Value!");
	}
	return 0;
}
